package com.chen.dto;

import com.chen.base.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @author chenfuyun
 */
@Data
@NoArgsConstructor
public class DeptDto extends BaseDto {
    /**
     * 父部门编号
     */
    private String parentDeptNo;
    /**
     * 部门编号
     */

    private String deptNo;
    /**
     * 部门名称
     */

    private String deptName;
    /**
     * 排序
     */

    private Integer sortNo;
    /**
     * 负责人Id
     */
    private Long leaderId;
    /**
     * 是否启用（0:启用，1:禁用）
     */
    private String dataState;
    /**
     * 层级
     */
    private Integer level = 4;
    @Builder
    public DeptDto(String parentDeptNo, String deptNo, String deptName, Integer sortNo, Long leaderId, String dataState, Integer level) {
        this.parentDeptNo = parentDeptNo;
        this.deptNo = deptNo;
        this.deptName = deptName;
        this.sortNo = sortNo;
        this.leaderId = leaderId;
        this.dataState = dataState;
        this.level = level;
    }
    @Override
    public int hashCode() {
        int result = Objects.hash(super.hashCode(), getParentDeptNo(), getDeptNo(), getDeptName(), getDataState(), getLeaderId());
        return result;
    }
}
